import type { DictItem } from '@/types/common/dict'

export const getDictLabelByValue = (dict: DictItem[], value: number) =>{
  return dict.find(item => item.value === value)?.label
}

export const sexDict: DictItem[] = [
  { label: '男', value: 0 },
  { label: '女', value: 1 },
]


export const statusDict: DictItem[] = [
  { label: '启用', value: 0 },
  { label: '禁用', value: 1 },
]

export const categoryDict: DictItem[] = [
  { label: '一级分类', value: 0 },
  { label: '二级分类', value: 1 },
]

export const permissionDict: DictItem[] = [
  { label: '菜单', value: 0 },
  { label: '操作', value: 1 },
]
